function HM = HPZ_Houtman_Maks_efficiency_index (SDRP)

%UNTITLED Summary of this function goes here
%   Detailed explanation goes here

% Interface file to HoutmanMaksCFGK.m that was written by Daniel Martin. 
% The package of Matlab files that calculates the Houtman Maks index was 
% downloaded from Daniel Martin's personal website on November 5th 2011.
% For the implementation I used the readme file that is located next to the
% package on the same website.

[rows,cols] = size (SDRP);

SDRP_num = sum(sum(SDRP));

input=zeros(SDRP_num,2);

index=1;

for i=1:rows
    for j=1:cols
        if SDRP(i,j)==1
            input(index,1)=j;
            input(index,2)=i;
            index=index+1;
        end
    end
end

HM_Vector = HoutmanMaksCFGK(input);

HM = rows - HM_Vector(1,1);

end

